import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from 'path'

import Components from 'unplugin-vue-components/vite';
import { VantResolver } from '@vant/auto-import-resolver';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    Components({
      resolvers: [VantResolver()],  
      // vant 的按需引入的配置
    }),
  ],
  server:{
    port:8080
  },
  
  resolve:{
    alias:{
      // @取代绝对路径
      '@':resolve(__dirname,'src')
    }
  }
})
